<?php
// 报告所有 PHP 错误
error_reporting(-1);

define('__LSS_CLIENT_ROOT', dirname(__DIR__));

// 设置LssClient的Access Key ID、Secret Access Key和ENDPOINT
$LSS_TEST_CONFIG = [
    'credentials' => [
        'accessKeyId' => '8aab1f45618f4eefb98e26a469310d03',
        'secretAccessKey' => '747ad75383974f5f92a41d4b2906a349',
//        'sessionToken' => 'your session token'
    ],
//    'endpoint' => 'http://lss.bj.baidubce.com',
//    'stsEndpoint' => 'sts host',
];

// 设置log的格式和级别
$STDERR = fopen('php://stderr', 'w+');
$__handler = new \Monolog\Handler\StreamHandler($STDERR, \Monolog\Logger::DEBUG);
$__handler->setFormatter(
    new \Monolog\Formatter\LineFormatter(null, null, false, true)
);
\BaiduBce\Log\LogFactory::setInstance(
    new \BaiduBce\Log\MonoLogFactory(array($__handler))
);
\BaiduBce\Log\LogFactory::setLogLevel(\Psr\Log\LogLevel::DEBUG);